#ifndef __CoCMovieClipNode_H__
#define __CoCMovieClipNode_H__

#include "CoCShapeNode.h"
#include "CoCElementMovieClip.h"

class CoCMovieClipNode : public Node
{    
public:
	static CoCMovieClipNode* create(char cFrameRate, unsigned short nFrameCount);
    virtual ~CoCMovieClipNode();
	CoCMovieClipNode();
    
    virtual bool initWithData(char cFrameRate, unsigned short nFrameCount);

	void AddShapdeNode(CoCShapeNode *pNode);
	void AddFrameInfo(int nFrameIndex, FrameInfo *pInfo);

	void updateFrame(float ft);
	Rect getRect();

private:
	Node *m_pShapeRoot;

private:
	char m_cFrameRate;
	unsigned short m_nFrameCount;
	unsigned short m_nCurrentFrame;

	std::vector<CoCShapeNode*> m_vecShapNode;
	std::vector<std::vector<FrameInfo*>> m_vecFrameInfo;
};

#endif // __CoCMovieClipNode_H__
